package com.qlslylq.ad.sdk.net.api;

import com.qlslylq.ad.sdk.model.req.AppBehaviorAddDTO;
import com.qlslylq.ad.sdk.model.req.UserBehaviorAddDTO;
import com.qlslylq.ad.sdk.model.rsp.AdPlaceWebVO;
import com.qlslylq.ad.sdk.model.rsp.BooleanVO;
import com.qlslylq.ad.sdk.model.rsp.MediaWebVO;
import com.qlslylq.ad.sdk.net.ResponseObject;

import io.reactivex.Flowable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 网络服务<br/>
 */
public interface ApiService {

    /**
     * 获取媒体配置信息<br/>
     */
    @GET("/api/ssp/media")
    Flowable<ResponseObject<MediaWebVO>> getMediaConfigList(
            @Query("mediaId") long mediaId
    );

    /**
     * 获取广告位的轮换策略<br/>
     */
    @GET("/api/ssp/adPlace")
    Flowable<ResponseObject<AdPlaceWebVO>> getPlaceAdList(
            @Query("adPlaceId") long adPlaceId
    );

    /**
     * 添加埋点数据（广告）<br/>
     */
    @POST("/api/ssp/adPlace/call")
    Flowable<ResponseObject<BooleanVO>> addTrack(
            @Body UserBehaviorAddDTO addDTO
    );

    /**
     * 添加埋点数据（系统）<br/>
     */
    @POST("/api/track/userBehavior")
    Flowable<ResponseObject<BooleanVO>> addTrackForApp(
            @Body AppBehaviorAddDTO addDTO
    );

}